
Page({
	data: {

	},
	onLoad: function (options) {
		this.setData({
			payResult: options.flag,
			id: options.id,
			from: options.from
		});
	},
	viewOrder: function () {
		if (this.data.from == 'my') {
			wx.redirectTo({
				url: '../order/order?from=order&id=' + this.data.id
			});
		} else {
			//返回上一级
			wx.navigateBack({
				delta: 1
			})
		}
	},
	//分享效果
	onShareAppMessage: function () {
		var referral_code = wx.getStorageSync('referral_code');
		return {
			title: '唐潮盐匠-自贡冷吃系列',
			path: 'pages/home/home?referral_code=' + referral_code
		}
	}
})